Page({
    data: {
        none1:false,
        itemTitle: '价格',
        option2: '人气',
        option3: '好评',
        price: ['免费', '￥50以下', '￥50-100', '￥100-500', '￥500-1000', '￥1000以上'],
        option1: [
            { text: '综合', value: 0 },
            { text: '新款商品', value: 1 },
            { text: '活动商品', value: 2 },
        ],
        value1: 0,
        value2: 0,
        value3: 0,
        list: [
            { imgUrl: '/img/lun4.jpg', name: '课程名字1', introduce: '这里是课程的简单介绍,这里是课程的简单介绍,这里是课程的简单介绍...', money: '￥188' },
            { imgUrl: '/img/lun4.jpg', name: '课程名字2', introduce: '这里是课程的简单介绍,这里是课程的简单介绍,这里是课程的简单介绍...', money: '￥188' },
            { imgUrl: '/img/lun4.jpg', name: '课程名字3', introduce: '这里是课程的简单介绍,这里是课程的简单介绍,这里是课程的简单介绍...', money: '￥188' },
        ],
        add:  { imgUrl: '/img/lun3.jpg', name: '课程名字666', introduce: '这里是课程的简单介绍,这里是课程的简单介绍,这里是课程的简单介绍...', money: '￥188' },
        plhider: '上拉加载更多',
        count: 0,
        lock: false,
    },
    bindscrolltolower() {
        if (this.data.lock || this.data.count == 3) {
            return;
        }
        this.setData({
            plhider: this.data.plhider = '加载中',
            lock: true,
            none1:true
        })
        setTimeout(() => {
            this.data.list.push(this.data.add)
            this.setData({
                list: this.data.list,
                plhider: (this.data.count + 1 == 3) ? '我是有底线的' : '上拉加载更多',
                lock: false,
                none1:false,
                count: this.data.count + 1
            })
        }, 2000)
        console.log(this.data.list);

    },
    onConfirm() {
        this.selectComponent('#item').toggle();
    },

    onSwitch1Change({ detail }) {
        this.setData({ switch1: detail });
    },

    onSwitch2Change({ detail }) {
        this.setData({ switch2: detail });
    },
});